<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class OANotice extends Model
{
    protected $table = 'notice';
    public $timestamps = false;
    protected $fillable = [
        'uid','title','content','publish_at'
    ];

    protected $casts = [
        'publish_at'=>'datetime:Y-m-d H:i:s'
    ];
    
    protected $rules = [
        'uid'=>'required',
        'title'=>'required|string'
    ];

    public function staff()
    {
        return $this->belongsTo(OAStaff::class,'uid');
    }
}
